<?php 
header('content-type:text/html; charset=utf-8');
session_start();
?>
<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap 模板</title>
	  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" charset="UTF-8" >
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <link href="css/bootstrap.min.css" rel="stylesheet">
      <script src="js/jquery-1.11.1.min.js"></script>
      <script src="js/bootstrap.min.js"></script>
      <!--[if lt IE 9]>
         <script src="js/html5shiv.js"></script>
         <script src="js/respond.min.js"></script>
      <![endif]-->
   </head>
   <body>
   	<div class="container">
      	<div class="row">
      	<div class="col-xs-4"></div>
      		<div class="col-xs-4">
      		<nav class="navbar navbar-default">
				<form class="navbar-form navbar-left" action="sou.php" method="post">
      		  		<div class="input-group">
         				 <input type="text" class="form-control" placeholder="搜索" name="name">
		 					 <span class="input-group-btn">
        						<button class="btn btn-default" type="submit">
        						<span class="glyphicon glyphicon-search"></span>
        						</button>
        						</span>
      		 	 				</div>
        					</form>
					<ul class="nav navbar-nav">
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-th-list"></span>     通讯录</a>
								 <ul class="dropdown-menu">
								      <li><a href="#xx">添加</a></li>
								      <li class="divider"></li>
								       <li><a href="th2.php">列表</a></li>
								      </ul>
								    </li>
								 </ul>
								</nav>
								</div>
								<div class="col-xs-4"></div>
								</div>
							<div class="row">
							<div class="col-xs-4"></div>
								<div class="col-xs-4">
									<div class="panel panel-default">
										<div class="panel-heading">
   					<div class="title" data-toggle="collapse" data-target="#xx"><h4>添加新联系人　　　　　　<?php 
									if(isset($_SESSION['yazi'])){
									print_r("<a href='logout.php'>点击退出</a>");
									}else{
									header('Refresh:2;url=/login.php');
									die('<h3>请先登录</h3><a>返回重新登录</a>');
}
?></h4></div>
				</div>
				<div id="xx">
					<div class="modal-body">
						<form class="form-horizontal" action="zeng.php" method="post">
      						<div class="form-group">
      							<label class="col-xs-3 control-label">姓名</label>
      								<div class="col-xs-9">
									<input class="form-control" name="name">
								 </div>
							 </div>
		 <div class="form-group">
      			<label class="col-xs-3 control-label">手机</label>
					<div class="col-xs-9">
						<div class="input-group">
							<input class="form-control" name="shou">
								 <span class="input-group-btn">
        							<button class="btn btn-default" data-toggle="modal" data-target="#a" type="button">删除</button>
    	 								 	</span>
										</div>
      								</div>
								</div>
								<div class="form-group">
      			<label class="col-xs-3 control-label">QQ</label>
					<div class="col-xs-9">
						<div class="input-group">
							<input class="form-control">
								 <span class="input-group-btn">
        							<button class="btn btn-default" type="button">删除</button>
    	 								 	</span>
										</div>
      								</div>
								</div>
			<div class="form-group">
      			<label class="col-xs-3 control-label">添加</label>
					<div class="col-xs-9">
						<button class="btn btn-default" data-toggle="modal" data-target="#b" type="button"><span class="glyphicon glyphicon-plus"></span></button>
    	 					</div> 	
						</div>
						<div class="form-group">
							<label class="col-xs-3 control-label"></label>
								<div class="col-xs-9">
									<button class="btn btn-primary" type="submit">保存</button>
										<button class="btn btn-default" data-dismiss="modal">取消</button>
									</div>
								</div>
	  						</form>
						</div>
					</div>
				</div>
							</div>
							<div class="col-xs-4"></div>
							</div>
		<div id="a"class="modal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<b class="close" data-dismiss="modal">&times;</b>
							<div class="modal-title" align="center">
								<h3>删除确认</h3>
							</div>
						</div>
				<div class="modal-body">
					<h4>确认删除手机号：18689898948？</h4>
					</div>
					<div class="modal-footer">
						<button class="btn btn-primary">确定</button>
						<button class="btn btn-default" data-dismiss="modal">取消</button>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
		<div id="b"class="modal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<b class="close" data-dismiss="modal">&times;</b>
							<div class="modal-title">
								<h3>添加条目</h3>
							</div>
						</div>
				<div class="modal-body">
					<form class="form-horizontal">
					<div class="form-group">
      						<label class="col-xs-3 control-label">类型</label>
								<div class="col-xs-9">
      								<div class="input-group">
										<input type="text" placeholder="手机号" class="form-control">
											 <div class="input-group-btn">
        										 <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
       											 <ul class="dropdown-menu dropdown-menu-right">
										          <li><a href="#">手机号</a></li>
										          <li><a href="#">QQ</a></li>
										          <li><a href="#">邮箱</a></li>
										          <li class="divider"></li>
										          <li><a href="#">博客</a></li>
										       	 </ul>
    	 								 	</div>
										</div>
								 </div>
							</div>
						<div class="form-group">
      							<label class="col-xs-3 control-label">内容</label>
      								<div class="col-xs-9">
										<input class="form-control">
									</div>
								</div>
						</form>
					</div>
					<div class="modal-footer">
						<button class="btn btn-primary">确定</button>
						<button class="btn btn-default" data-dismiss="modal">取消</button>
					</div>
					</div>
				</div>
			</div>
		</div>
		</div>
   </body>
</html>